<style>
    .baototo_ico{text-align: center;width: 99px; border: 1px solid #ffffff;float: left;margin-left: 10px;}
    .baototo_ico:hover{border: 1px solid #48be1a }
</style>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-content">
                <div class="row">
                    <form action="<?=url('taocan.nav/create')?>" id="form-create" method="post" class="form-horizontal"
                          role="form">
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right"><span
                                    class="c-red">*</span>导航名称：</label>
                            <div class="col-sm-9">
                                <input type="text" value="<?=isset($detail->nav_name)?$detail->nav_name:''?>"
                                       placeholder="" id="nav_name" name="nav_name" class="form-control"/> 导航图标
                            </div>
                        </div>
                        <link rel="stylesheet" type="text/css" href="/public/common/webuploader-0.1.5/webuploader.css">
                        <script type="text/javascript" src="/public/common/webuploader-0.1.5/webuploader.js"></script>


                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right"><span
                                    class="c-red">*</span>导航图标：</label>
                            <div class="col-sm-9 ">
                                <input type="hidden" id="photo" name="nav_ico">
                                <?php foreach(config('dataattr.baototoico') as $val) {?>
                                <div class="baototo_ico" url="<?=getImg($val['url'])?>" >
                                    <img style="width: 50px;" src="/attachs/uploads/<?=getImg($val['url'])?>"/>
                                    <p >推荐标题：<?=$val['name']?></p>
                                </div>
                                <?php } ?>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right"><span
                                    class="c-red">*</span>排序：</label>
                            <div class="col-sm-9">
                                <input type="text" value="<?=isset($detail->orderby)?$detail->orderby:''?>"
                                       placeholder="数字越大靠前" id="orderby" name="orderby" class="form-control"/> 排序
                            </div>
                        </div>
                        <div class="clearfix form-actions">
                            <div class="col-md-offset-3 col-md-9">
                                <button mini="submit" for="form-create" class="btn btn-info" type="button">
                                    <i class="ace-icon fa fa-check bigger-110"></i>
                                    保存
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(".baototo_ico").click(function () {
            $(".baototo_ico").css("border","1px solid #ffffff");
            $(this).css("border"," 1px solid #48be1a");
            $("#photo").val($(this).attr("url"));
    })
</script>